<div class="users form container">
	
	<h2><?php echo __d('admin', 'Create User'); ?></h2>
	
<?php
	$formOptions = array (
		'inputDefaults' => array (
			'div' => array('class' => 'form-group'),
			'class' => 'form-control'
		)
	);
	
	$formElements = array (
		
		'basic' => array (
		
			'legend' => __d('admin', 'Basic Info'),

			'first_name' => array(
				'placeholder' => __d('admin', 'First Name')
			),
			'last_name' => array(
				'placeholder' => __d('admin', 'Last Name')
			),
			'email' => array (
				'placeholder' => __d('admin', 'you@example.com')
			),
			'username' => array (
				'placeholder' => __d('admin', 'username'),
				'label' => __d('admin', 'Display Name')
			),
			'Picture.file' => array(
				'type' => 'file',
				'class' => 'file',
				'label' => __d('admin', 'Picture'),
				'after' => '<p class="help-block">' . __d('admin', 'Upload an image from your computer') . '</p>'
			),
			'birthdate' => array (
				'class' => 'datepicker',
				'placeholder' => 'yyyy-mm-dd',
				'between' => '<br/>',
				'default' => '--'
			)
		),
		'extra' => array (
			'legend' => __d('admin', 'Additional Info'),
			'idn' => array('placeholder' => '##.###.###'),
			'rif' => array('placeholder' => 'X-#########-#'),
			'subscribed' => array (
				'type' => 'checkbox',
				'label' => false,
				'before' => '<div class="checkbox"><span class="glyphicon glyphicon-home"></span> <label>' . __d('admin', 'Subscribed to Newsletters?'),
				'after' => '</label></div>',
				'value' => 'Y'
			)
		)
	);
	
?>
	<?php echo $this->Form->create('User', $formOptions); ?>
		<div>
			<?php
				foreach($formElements as $fieldGroup) {
					echo $this->Form->inputs($fieldGroup) . "\n\n";
				}
				echo $this->Form->submit(__d('admin', 'Create'), array('class' => 'btn btn-primary'));
			?>
		</div>
	<?php echo $this->Form->end(); ?>
	
</div>
